/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 74646
 * Date: 2022-03-26
 * Time: 22:16
 */
class OuterClassC {
    public int data1 = 1;
    public int data2 = 2;
    public static int data3 = 3;

    //静态内部类
    static class InnerClass {
        public int data4 = 4;
        private int data5 = 5;
        public static int data6 = 6; //在静态内部类中可以定义静态的成员变量

        public InnerClass() {
            System.out.println("不带参数的静态内部类的构造方法！");
        }
        public void test() {
            System.out.println("静态内部类的成员方法");
        }
    }

    public static void main(String[] args) {
        OuterClassC.InnerClass innerClass = new OuterClassC.InnerClass();
        innerClass.test();
    }
}

public class TestDemo2 {
}
